<?php
namespace app\api\controller;
use app\BaseController;
use think\facade\Db;
class Index extends Base
{
    public function upImg(){
        $file = request()->file('file');
        $savename = \think\facade\Filesystem::putFile( 'uploads', $file);
        $this->info['code'] = 1;
        $this->info['msg'] = '上传成功';
        $this->info['data'] = str_replace("\\","/",$savename);
        return json($this->info);
    }
}
